<template>
 <h1>
   事件绑定指令
 </h1>
  <input type="text" v-model="search" @keydown.enter="f">
</template>
<script setup>

import {ref} from "vue";

const search = ref('')

const f = ()=>
{
    alert(search.value)
}

</script>


<style scoped>

</style>